_require local "../../../../basis.smi"
_require local "../../../../smlnj-lib/Util/lib-base.smi"
_require local "../../../data/symbols/main/RecordLabel.smi"
_require local "../../../extensions/debug/main/Bug.smi"
(* _require local "../../../libs/env/main/SEnv.smi" *)

_require local "../../../extensions/usererror/main/UserErrorUtils.smi"
(* _require local "../../../compilerIRs/patterncalc/main/PatternCalc.ppg.smi" *)
(* _require local "../../../compilerIRs/patterncalc/main/PatternCalcInterface.ppg.smi" *)
_require local "../../../data/types/main/TvarMap.smi"
(* _require local "../../../compilerIRs/idcalc/main/EvalIty.smi" *)
(* _require local "./EvalSig.smi" *)
_require local "./EvalTy.smi"
(* _require local "./FunctorUtils.smi" *)
_require local "./NameEvalError.ppg.smi"
_require local "./NameEvalUtils.smi"
_require local "./NormalizeTy.smi"
(* _require local "./SetLiftedTys.smi" *)
_require local "./TfunVars.smi"

_require "../../../libs/ids/main/LocalID.smi"
_require "../../../data/symbols/main/Loc.smi"
_require "../../../data/symbols/main/Symbol.smi"
_require "../../../compilerIRs/idcalc/main/IDCalc.ppg.smi"
_require "./NameEvalEnv.ppg.smi"
_require local "./NameEvalEnvPrims.smi"
_require "./Subst.smi"

structure SigCheck =
struct
  exception SIGCHECK
  datatype mode = Opaque | Trans
  type sigCheckParam =
    {loc:Loc.loc, mode:mode, specEnv:NameEvalEnv.env,
     strEnv:NameEvalEnv.env, strPath:Symbol.longsymbol}
  type sigCheckResult = NameEvalEnv.env * IDCalc.icdecl list
  val sigCheck : sigCheckParam -> sigCheckResult
  val removeEnv : NameEvalEnv.env * NameEvalEnv.env -> NameEvalEnv.env
  val refreshEnv : Symbol.longsymbol -> TypID.Set.set * Subst.exnIdSubst
                   -> NameEvalEnv.env
                   -> (Subst.tfvSubst * Subst.conIdSubst) * NameEvalEnv.env
end
